home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_gimp.idb / usr / freeware / share / gimp / scripts / gradient-bevel-logo.scm.z / gradient-bevel-logo.scm
Encoding:
GIMP Script-Fu Script  |  1999-07-21  |  3.5 KB  |  85 lines

  1. ; The GIMP -- an image manipulation program
  2. ; Copyright (C) 1995 Spencer Kimball and Peter Mattis
  3. ; This program is free software; you can redistribute it and/or modify
  4. ; it under the terms of the GNU General Public License as published by
  5. ; the Free Software Foundation; either version 2 of the License, or
  6. ; (at your option) any later version.
  7. ; This program is distributed in the hope that it will be useful,
  8. ; but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  10. ; GNU General Public License for more details.
  11. ; You should have received a copy of the GNU General Public License
  12. ; along with this program; if not, write to the Free Software
  13. ; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  14. ;
  15. ;  Gradient Bevel v0.1  04/08/98
  16. ;  by Brian McFee <keebler@wco.com>
  17. ;  Create cool glossy bevelly text
  18.  
  19. (define (script-fu-gradient-bevel-logo text size font bevel-height bevel-width)
  20.   (let* ((img (car (gimp-image-new 256 256 RGB)))
  21.          (border (/ size 4))
  22.      (text-layer (car (gimp-text img -1 0 0 text border TRUE size PIXELS "*" font "*" "*" "*" "*")))
  23.      (width (car (gimp-drawable-width text-layer)))
  24.      (height (car (gimp-drawable-height text-layer)))
  25.          (indentX (+ border 12))
  26.      (indentY (+ border (/ height 8)))
  27.      (bg-layer (car (gimp-layer-new img width height RGBA_IMAGE "Background" 100 NORMAL)))
  28.      (blur-layer (car (gimp-layer-new img width height RGBA_IMAGE "Blur" 100 NORMAL)))
  29.      (old-fg (car (gimp-palette-get-foreground)))
  30.      (old-bg (car (gimp-palette-get-background))))
  31.     (gimp-image-disable-undo img)
  32.     (gimp-image-resize img width height 0 0)
  33.     (gimp-image-add-layer img bg-layer 1)
  34.     (gimp-image-add-layer img blur-layer 1)
  35.  
  36.     (gimp-selection-all img bg-layer)
  37.     (gimp-edit-fill img bg-layer)
  38.     (gimp-selection-none img)
  39.  
  40.     (gimp-layer-set-preserve-trans blur-layer TRUE)
  41.     (gimp-palette-set-background '(255 255 255))
  42.     (gimp-selection-all img blur-layer)
  43.     (gimp-edit-fill img blur-layer)
  44.     (gimp-edit-clear img blur-layer)
  45.     (gimp-selection-none img)
  46.     (gimp-layer-set-preserve-trans blur-layer FALSE)
  47.     (gimp-selection-layer-alpha img text-layer)
  48.     (gimp-edit-fill img blur-layer)
  49.     (plug-in-gauss-rle 1 img blur-layer bevel-width 1 1)
  50.     (gimp-selection-none img)
  51.     (gimp-palette-set-background '(127 127 127))
  52.     (gimp-palette-set-foreground '(255 255 255))
  53.     (gimp-layer-set-preserve-trans text-layer TRUE)
  54.     (gimp-selection-all img text-layer)
  55.     (gimp-blend img text-layer FG-BG-RGB NORMAL RADIAL 95 0 REPEAT-NONE FALSE 0 0 indentX indentY indentX (- height indentY))
  56.     (gimp-selection-none img)
  57.     (gimp-layer-set-preserve-trans text-layer FALSE)
  58.     (gimp-layer-set-name text-layer text)
  59.     (plug-in-bump-map 1 img text-layer blur-layer 115 bevel-height 5 0 0 0 15 TRUE FALSE 0)
  60.     (gimp-layer-set-offsets blur-layer 5 5)
  61.     (gimp-invert img blur-layer)
  62.     (gimp-layer-set-opacity blur-layer 50.0)
  63.     (gimp-image-set-active-layer img text-layer)
  64.     (gimp-palette-set-background old-bg)
  65.     (gimp-palette-set-foreground old-fg)
  66.     (gimp-image-enable-undo img)
  67.     (gimp-display-new img)))
  68.  
  69.  
  70. (script-fu-register "script-fu-gradient-bevel-logo"
  71.             "<Toolbox>/Xtns/Script-Fu/Logos/Gradient Bevel"
  72.             "Makes Shiny Bevelly text"
  73.             "Brian McFee <keebler@wco.com>"
  74.             "Brian McFee"
  75.             "April 1998"
  76.             ""
  77.             SF-VALUE "Text String" "\"Moo\""
  78.             SF-VALUE "Font Size (in pixels)" "90"
  79.             SF-VALUE "Font" "\"futura_poster\""
  80.             SF-VALUE "Bevel Height (sharpness)" "40"
  81.             SF-VALUE "Bevel Width" "2.5")
  82.